all: interp.eps inter.pdf

interp: interp.c
	gcc -o interp interp.c -lm -lgsl -lgslcblas

interp.dat: interp
	./interp > interp.dat

interp.eps: interp.dat
	graph -T ps < interp.dat > interp.eps

inter.pdf: inter.tex
	xelatex inter.tex

clean:
	rm -f *.dat *.eps *.pdf *.aux *.log

.PHONY: all clean